﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mepostras.BLL;

namespace mepostras.BO
{
    public interface IUserAccountBo
    {
        /// <summary>
        /// Render từ Id thành chuỗi để lưu LocalId. 
        /// Ex: 1 => USR00001
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        string RenderLocalId(int id);

        /// <summary>
        /// Insert User
        /// </summary>
        /// <param name="user"></param>
        /// <param name="messageCode">Mã nội dung trả về</param>
        /// <returns></returns>
        bool Insert(UserAccount user, out string messageCode);

        /// <summary>
        /// Update User
        /// </summary>
        /// <param name="user"></param>
        /// <param name="messageCode">Mã nội dung trả về</param>
        /// <returns></returns>
        bool Update(UserAccount user, out string messageCode);

        /// <summary>
        /// Delete User
        /// </summary>
        /// <param name="user"></param>
        /// <param name="messageCode">Mã nội dung trả về</param>
        /// <returns></returns>
        bool Delete(UserAccount user, out string messageCode);

        /// <summary>
        /// Delete User
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="messageCode">Mã nội dung trả về</param>
        /// <returns></returns>
        bool Delete(int userId, out string messageCode);

        /// <summary>
        /// Delete User
        /// </summary>
        /// <param name="username"></param>
        /// <param name="messageCode">Mã nội dung trả về</param>
        /// <returns></returns>
        bool Delete(string username, out string messageCode);
    }
}
